#< { 'use-with':'Pacify' , 'type':'input' , 'name':'plaintext' , 'argvalue':'txt' , 'extension':'txt'  , 'version':'2011.1003' , 'author':'AGGOTT HÖNSCH István'} >#

from ptext import *

def load_module(self):
	self.addMethod(init_input)
	self.addMethod(readfile)

def init_input(self):
	return True

def readfile(self):
	self.log.info("Loading "+self.infilename+" into memory...")
	
	infile = open(self.infilename, 'r')
	
	original = ''
	for line in infile:
		original += line
	
	infile.close()
	
	self.log.info("Successfully loaded "+self.infilename+".")
	
	self.buffer = RichString(original)
	
	print('')
	
	return True

if __name__ == "__main__":
	print("\n\tThis is a Pacify plugin and cannot be executed directly.")